Study of settlement dynamics aims to respond to the (‘Where?’) question.
This HTML web page presentation is hosted on this GitHub repository. It results from a R report generation. The source document is a Rmarkdown file using mainly packages like Leaflet and Plotly.
This presentation attempts to illustrate i) the reuse of existing data for land-tenure, allotment practices, settlement dynamics over the long-term, ii) IT solutions with R and others To simplify the lecture of the presented methods, part of R code used to generate the graphics and maps is shown and the analysis is restricted to the Northern Europe between 2800 BC and 1000 AD
Proxys of land tenure can be controlled fires, palynological evidences, etc.
The Global Charcoal Database (GCD) gather thousand of sedimentary records of fire. This database can be read with the R package paleofire (Blarquez et al. 2014). Here we subset the data coming from South Scandinavian
data(paleofiredata)
ID <- pfSiteSel(lat > 51 & lat < 59,
long > 5 & long < 17)
sumID <- summary(ID)
samleID <- sumID[sample(nrow(sumID), 6), ]
kable(samleID,"html",
row.names = F,
caption = "Sample of sedimentary records of fire") %>%
kable_styling(full_width = FALSE, position = "center", font_size=11)
| id_site | lat | long | elevation | min_est_age | max_est_age | num_dating | date_int | num_samp | l12 | rf99 | methods |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 950 | 56.44 | 12.57 | NA | 183.5 | 2806.0 | NA | NA | 36 | 0 | 0 | NA |
| 470 | 56.91 | 14.90 | 187 | 25.0 | 10535.0 | 18 | 583.8889 | 77 | 5 | 4 | POLS |
| 898 | 56.16 | 14.89 | 3 | 3052.9 | 10002.3 | NA | NA | 157 | 5 | 0 | NA |
| 899 | 56.15 | 15.11 | -1 | 261.8 | 10026.4 | NA | NA | 227 | 5 | 0 | NA |
| 555 | 56.51 | 8.83 | 8 | 15.0 | 6215.0 | NA | NA | 72 | 5 | 5 | POLS |
| 953 | 57.02 | 16.12 | NA | -44.0 | 2355.0 | NA | NA | 41 | 5 | 4 | NA |
The key field ‘id_site’ allows to connect each the database record to the root URL of the GDC database (with the package kableExtra
id.url <- "https://paleofire.org/index.php?p=CDA/site_view&gcd_menu=CDA&site_id="
samleID$url <- paste0(id.url, samleID$id_site)
samleID %>%
mutate(id_site = cell_spec(id_site, "html", link = url)) %>%
dplyr::select (-url) %>% # avoid conflict with 'raster' package
kable("html", escape = FALSE,
caption = "Sample of mtDNA metatadata with hyperlinks") %>%
kable_styling(bootstrap_options = c("hover", "condensed"), font_size=11)
| id_site | lat | long | elevation | min_est_age | max_est_age | num_dating | date_int | num_samp | l12 | rf99 | methods | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Halledammen Hallands Vadero | 950 | 56.44 | 12.57 | NA | 183.5 | 2806.0 | NA | NA | 36 | 0 | 0 | NA |
| Stavsakra Bog | 470 | 56.91 | 14.90 | 187 | 25.0 | 10535.0 | 18 | 583.8889 | 77 | 5 | 4 | POLS |
| Hunnemara Lake Blekinge coast | 898 | 56.16 | 14.89 | 3 | 3052.9 | 10002.3 | NA | NA | 157 | 5 | 0 | NA |
| Smygen Bay Blekinge coast | 899 | 56.15 | 15.11 | -1 | 261.8 | 10026.4 | NA | NA | 227 | 5 | 0 | NA |
| Skanso | 555 | 56.51 | 8.83 | 8 | 15.0 | 6215.0 | NA | NA | 72 | 5 | 5 | POLS |
| Skargolarna | 953 | 57.02 | 16.12 | NA | -44.0 | 2355.0 | NA | NA | 41 | 5 | 4 | NA |
The GCD web site already offers a web map interface (e.g. Jackfish archaeological site) but one can use the Leaflet package for further data integration
The open-access Landscape Dynamics (landDX) database (Amoke et al. 2020) offers a training dataset, by the mean of shapefiles, to analyse the settlement distribution. Here we sampled some polygons and polylines from the Nakuru county (South Kenya). We add a selectable basemap
To model the shapes of settlements (POLYGONS), one can use the R package stampr (Long, Robertson, and Nelson 2018). At first, the shape index compactness and roundness can be calculated beside their corresponding the canonical shapes, respectively the minimum bounding rectangle (MBR) and the minimum bounding circle (MBC).
rd.i.cp <- data.frame(idf = numeric(0),
compactness = numeric(0),
roundness = numeric(0))
mbrs.list <- mbcs.list <- list()
for(p in 1:nrow(landDX.polygons)){
a.polyg <- landDX.polygons[p, ]
a.polyg.sf <- st_as_sf(a.polyg)
# attributes and dataframe
idf <- rownames(a.polyg@data)
a.compactness <- fs_compact(a.polyg.sf)
a.roundness <- as.numeric(fs_area(a.polyg.sf) / fs_area(fs_mbc(a.polyg.sf)))
rd.i.cp[nrow(rd.i.cp)+1, ] <- c(idf,
round(a.compactness, 2),
round(a.roundness, 2))
## MBR and MBC
# MBR
a.mbr <- st_geometry(st_as_sfc(st_bbox(a.polyg)))
a.mbr.sp <- as_Spatial(a.mbr)
a.mbr.spdf <- SpatialPolygonsDataFrame(a.mbr.sp,
data.frame(id=idf),
match.ID = F)
mbrs.list[[length(mbrs.list)+1]] <- a.mbr.spdf
# MBC
a.mbc <- st_minimum_bounding_circle(a.polyg.sf)
a.mbc.spdf <- as(a.mbc, "Spatial")
mbcs.list[[length(mbcs.list)+1]] <- a.mbc.spdf
}
mbrs.list.sp <- do.call(bind, mbrs.list) # list to dfs
mbcs.list.sp <- do.call(bind, mbcs.list) # list to dfs
As an example, the first polygon can plotted with the native R function plot()
plot(mbrs.list.sp[1, ], border="red",
main = row.names(landDX.polygons@data)[1])
plot(mbcs.list.sp[1, ], add=T, border="blue")
plot(landDX.polygons[1, ], add=T, border="black")
Figure 1: Plot of the first polygon (black line) with its MBR (red line) and MBC (blue line)
Now, we can add the MBR and MBC to the Leaflet map
The rd.i.cp dataframe list all compactness and roundness values. To evaluate the distribution of the settlement shapes, a scatter plot on these two value can be plotted. the Plotly package allows to enrich the graphic by offering dynamic labeling tools (hoverinfo)
Figure 2: Scatterplot of compactness and roundness values